<?php
class MY_Controller extends CI_Controller{	
	
    function page($boday_page,$vewArray = array()){
    	$vewArray["logout_url"]      = '';
		$vewArray["register_url"]    = '';
		$vewArray["editprofile_url"] = '';
		$vewArray["login_url"]       = '';
		$vewArray["home_url"]        = '';
		
    	if($this->session->userdata("USER_ID")){
    		$vewArray["logout_url"] = anchor("member/logout","Logout");
			$vewArray["editprofile_url"] = anchor("member/editprofile","Editprofile");
			$vewArray["home_url"]        =  anchor("member/home","ome");
    	}  
		else{
			$vewArray["register_url"] = anchor("register/basic","Register");
			$vewArray["login_url"] = anchor("member/login","Login");
			$vewArray["home_url"]        = anchor(base_url(),'home');
		}
		$vewArray["search_url"]        = anchor("advancedsearch/search",'Search');  	
    	$this->load->view('header',$vewArray);
    	$this->load->view($boday_page,$vewArray);
    	$this->load->view('footer');
    }
    
}
